Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

strip-ansi

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strip-ansi

Strip ANSI escape codes from a string

  • 5.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
200M
increased by3.8%
Maintainers
2
Weekly downloads
 
Created

What is strip-ansi?

The strip-ansi npm package is used to remove ANSI escape codes from strings. These codes are often used to provide coloring and formatting in terminal output, but they can be problematic when the text needs to be processed without these codes, such as logging to a file or displaying in a GUI.

What are strip-ansi's main functionalities?

Strip ANSI escape codes from a string

This feature allows you to remove any ANSI escape codes from a given string, leaving only the plain text without any formatting or color.

const stripAnsi = require('strip-ansi');
const coloredString = '\u001B[4mUnicorn\u001B[0m';
const strippedString = stripAnsi(coloredString);
console.log(strippedString); // 'Unicorn'

Other packages similar to strip-ansi

Keywords

FAQs

Package last updated on 18 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc